<?php
namespace App\Module\Teacher\Controller;

use App\Common\Controller\AbstractController;
use App\Module\Teacher\Service\ChildService;
use Hyperf\Di\Annotation\Inject;

class ChildController extends AbstractController{

    /**
     * @Inject()
     * @var ChildService $childService
     */
    private $childService;

    public function search(){
        $name = $this->request->input("name");
        $pagesize = $this->request->input("pagesize");

        return $this->response->json($this->childService->search($name,$pagesize));
    }
}